
package gov.chinatax.ctcps.generator.form;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for nzjzNzjy.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="nzjzNzjyForm"
 */
public class NzjzNzjyForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _czdzbh = null;
   private java.lang.String _nd = null;
   private java.lang.String _zclxDm = null;
   private java.lang.String _zffsDm = null;
   private java.lang.String _yskmbm = null;
   private java.lang.String _zfxmbm = null;
   private java.math.BigDecimal _gssnjyje = null;
   private java.math.BigDecimal _czsndrje = null;
   private java.math.BigDecimal _gsjyje = null;
   private java.math.BigDecimal _czdrje = null;
   private java.math.BigDecimal _ce = null;
   private java.lang.String _dwbh = null;
   private java.lang.String _jzBz = null;
   private java.lang.String _sbBz = null;
   private java.lang.String _sx = null;
   private java.lang.String _zt1 = null;
   private java.lang.String _zt2 = null;

   /**
    * Standard constructor.
    */
   public NzjzNzjyForm() {
   }

   /**
    * Returns the czdzbh
    *
    * @return the czdzbh
    */
   public java.lang.String getCzdzbh() {
      return _czdzbh;
   }

   /**
    * Sets the czdzbh
    *
    * @param czdzbh the new czdzbh value
    */
   public void setCzdzbh(java.lang.String czdzbh) {
      _czdzbh = czdzbh;
   }
   /**
    * Returns the nd
    *
    * @return the nd
    */
   public java.lang.String getNd() {
      return _nd;
   }

   /**
    * Sets the nd
    *
    * @param nd the new nd value
    */
   public void setNd(java.lang.String nd) {
      _nd = nd;
   }
   /**
    * Returns the zclxDm
    *
    * @return the zclxDm
    */
   public java.lang.String getZclxDm() {
      return _zclxDm;
   }

   /**
    * Sets the zclxDm
    *
    * @param zclxDm the new zclxDm value
    */
   public void setZclxDm(java.lang.String zclxDm) {
      _zclxDm = zclxDm;
   }
   /**
    * Returns the zffsDm
    *
    * @return the zffsDm
    */
   public java.lang.String getZffsDm() {
      return _zffsDm;
   }

   /**
    * Sets the zffsDm
    *
    * @param zffsDm the new zffsDm value
    */
   public void setZffsDm(java.lang.String zffsDm) {
      _zffsDm = zffsDm;
   }
   /**
    * Returns the yskmbm
    *
    * @return the yskmbm
    */
   public java.lang.String getYskmbm() {
      return _yskmbm;
   }

   /**
    * Sets the yskmbm
    *
    * @param yskmbm the new yskmbm value
    */
   public void setYskmbm(java.lang.String yskmbm) {
      _yskmbm = yskmbm;
   }
   /**
    * Returns the zfxmbm
    *
    * @return the zfxmbm
    */
   public java.lang.String getZfxmbm() {
      return _zfxmbm;
   }

   /**
    * Sets the zfxmbm
    *
    * @param zfxmbm the new zfxmbm value
    */
   public void setZfxmbm(java.lang.String zfxmbm) {
      _zfxmbm = zfxmbm;
   }
   /**
    * Returns the gssnjyje
    *
    * @return the gssnjyje
    */
   public java.math.BigDecimal getGssnjyje() {
      return _gssnjyje;
   }

   /**
    * Sets the gssnjyje
    *
    * @param gssnjyje the new gssnjyje value
    */
   public void setGssnjyje(java.math.BigDecimal gssnjyje) {
      _gssnjyje = gssnjyje;
   }
   /**
    * Returns the czsndrje
    *
    * @return the czsndrje
    */
   public java.math.BigDecimal getCzsndrje() {
      return _czsndrje;
   }

   /**
    * Sets the czsndrje
    *
    * @param czsndrje the new czsndrje value
    */
   public void setCzsndrje(java.math.BigDecimal czsndrje) {
      _czsndrje = czsndrje;
   }
   /**
    * Returns the gsjyje
    *
    * @return the gsjyje
    */
   public java.math.BigDecimal getGsjyje() {
      return _gsjyje;
   }

   /**
    * Sets the gsjyje
    *
    * @param gsjyje the new gsjyje value
    */
   public void setGsjyje(java.math.BigDecimal gsjyje) {
      _gsjyje = gsjyje;
   }
   /**
    * Returns the czdrje
    *
    * @return the czdrje
    */
   public java.math.BigDecimal getCzdrje() {
      return _czdrje;
   }

   /**
    * Sets the czdrje
    *
    * @param czdrje the new czdrje value
    */
   public void setCzdrje(java.math.BigDecimal czdrje) {
      _czdrje = czdrje;
   }
   /**
    * Returns the ce
    *
    * @return the ce
    */
   public java.math.BigDecimal getCe() {
      return _ce;
   }

   /**
    * Sets the ce
    *
    * @param ce the new ce value
    */
   public void setCe(java.math.BigDecimal ce) {
      _ce = ce;
   }
   /**
    * Returns the dwbh
    *
    * @return the dwbh
    */
   public java.lang.String getDwbh() {
      return _dwbh;
   }

   /**
    * Sets the dwbh
    *
    * @param dwbh the new dwbh value
    */
   public void setDwbh(java.lang.String dwbh) {
      _dwbh = dwbh;
   }
   /**
    * Returns the jzBz
    *
    * @return the jzBz
    */
   public java.lang.String getJzBz() {
      return _jzBz;
   }

   /**
    * Sets the jzBz
    *
    * @param jzBz the new jzBz value
    */
   public void setJzBz(java.lang.String jzBz) {
      _jzBz = jzBz;
   }
   /**
    * Returns the sbBz
    *
    * @return the sbBz
    */
   public java.lang.String getSbBz() {
      return _sbBz;
   }

   /**
    * Sets the sbBz
    *
    * @param sbBz the new sbBz value
    */
   public void setSbBz(java.lang.String sbBz) {
      _sbBz = sbBz;
   }
   /**
    * Returns the sx
    *
    * @return the sx
    */
   public java.lang.String getSx() {
      return _sx;
   }

   /**
    * Sets the sx
    *
    * @param sx the new sx value
    */
   public void setSx(java.lang.String sx) {
      _sx = sx;
   }
   /**
    * Returns the zt1
    *
    * @return the zt1
    */
   public java.lang.String getZt1() {
      return _zt1;
   }

   /**
    * Sets the zt1
    *
    * @param zt1 the new zt1 value
    */
   public void setZt1(java.lang.String zt1) {
      _zt1 = zt1;
   }
   /**
    * Returns the zt2
    *
    * @return the zt2
    */
   public java.lang.String getZt2() {
      return _zt2;
   }

   /**
    * Sets the zt2
    *
    * @param zt2 the new zt2 value
    */
   public void setZt2(java.lang.String zt2) {
      _zt2 = zt2;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCzdzbh() == null) {
         errors.add("czdzbh", new ActionError("error.czdzbh.required"));
      }
      if(getNd() == null) {
         errors.add("nd", new ActionError("error.nd.required"));
      }
      if(getZclxDm() == null) {
         errors.add("zclxDm", new ActionError("error.zclxDm.required"));
      }
      if(getZffsDm() == null) {
         errors.add("zffsDm", new ActionError("error.zffsDm.required"));
      }
      if(getYskmbm() == null) {
         errors.add("yskmbm", new ActionError("error.yskmbm.required"));
      }
      if(getGssnjyje() == null) {
         errors.add("gssnjyje", new ActionError("error.gssnjyje.required"));
      }
      if(getCzsndrje() == null) {
         errors.add("czsndrje", new ActionError("error.czsndrje.required"));
      }
      if(getGsjyje() == null) {
         errors.add("gsjyje", new ActionError("error.gsjyje.required"));
      }
      if(getCzdrje() == null) {
         errors.add("czdrje", new ActionError("error.czdrje.required"));
      }
      if(getCe() == null) {
         errors.add("ce", new ActionError("error.ce.required"));
      }
      if(getDwbh() == null) {
         errors.add("dwbh", new ActionError("error.dwbh.required"));
      }
      // TODO test format/data
      return errors;
   }
}
